home *** CD-ROM | disk | FTP | other *** search
/ Chip: 2001 Haziran / CHIP Haziran2001.iso / prog / haziran / 20 / setup.exe / {app} / plugins / XQ Startmenu Items 1.xpl < prev    next >
Encoding:
XSetup plugin  |  2001-03-28  |  4.8 KB  |  156 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="9"
  3. "COUNT"="1"
  4. "UIPATH"="Appearance\Start menu\Visible Items"
  5. "NAME"="Visible Items"
  6. "VERSION"="1.10"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Aha! You can't see this!"
  9. "DESCRIPTION 1"="Use this plug-in to show or hide some of the items in the Start menu."
  10. "DESCRIPTION 2"="NOTE #1: You can only hide "Documents" if you have IE4 (with Windows Desktop Update) installed, and "Help" can only be hidden in Windows 2000 and Me."
  11. "DESCRIPTION 3"="NOTE #2: It can happen that if you disable the "Run..." command, you can no longer use the address bar of Internet Explorer. This seems to be a bug inside IE."
  12. "DESCRIPTION 4"="NOTE #3: Disabling "Find..." may also disable the context menu (Right-click) of the START button."
  13. "DESCRIPTION 5"="NOTE #4: Show "Log Off <Username>" might not work if you are using Windows 98 or Windows Me with IE 5 installed. Also, disabling this option will disable the SHUTDOWN button in the CTRL+ALT+DEL menu in Windows 9x"
  14. "DESCRIPTION 6"="NOTE #5: In Windows 2000 and Me, hiding the Run option will not disable the Windows+R key combination, so users will still be able to access the Run command."
  15. "AUTHOR"="Neil R. Turner (totalxs@hotmail.com) for Xteq Systems"
  16. "CONTACTURL"="http://www.128moorlane.freeserve.co.uk/"
  17. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  18. "COMMENT 1"="Thanks to Joe [gojoecollier@naxs.net] for the "Run might kill IE" bug notice!"
  19. "COMMENT 2"="Thanks to Jon-Roar Selenius [jseleniu@online.no] for spotting the "Recent Documents always empty" bug."
  20. "COMMENT 3"="Thanks to CptSiskoX for the "Show Log Off" Win98 note."
  21. "COMMENT 4"="Thanks to Bill Hudacek [hudacek@us.ibm.com] for spotting the NoFind = NoRightMouse bug."
  22. "COMMENT 5"="Thanks to SIMONORORKE for the Windows 2000 Logoff option!"
  23.  
  24. sP="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\"
  25. sP1="HKLM\Software\Microsoft\Internet Explorer\Version" ' This is for checking the IE version
  26. sP2="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoSMHelp"
  27. sP3="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\StartMenuRun" 'DW
  28. sP4="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\StartMenuLogoff" 'DW
  29.  
  30. SUB Plugin_Initialize
  31.  
  32. ' Step 1: Add UI Elements...
  33.  j=RegReadValue(sP1)
  34.  if j>"4" then ' Only show if IE4 or better is installed
  35.   Call SetUIElement(1,"Favorites")
  36.  end if
  37.  
  38.  j=RegReadValue(sP1)
  39.  if j>"4" then
  40.   Call SetUIElement(2,"Documents")
  41.  end if
  42.  
  43.  j=RegReadValue(sP1)
  44.  if j>"4" then
  45.   Call SetUIElement(6,"Log Off <username>...")
  46.  end if
  47.  
  48.  k=GetWinVer
  49.  if k>3 then
  50.   Call SetUIElement(7,"Help")
  51.  end if
  52.  
  53.  ' These are universal so no checking is necessary
  54.  
  55.  Call SetUIElement(3,"Run...")
  56.  Call SetUIElement(4,"Shut Down...")
  57.  Call SetUIElement(5,"Find")
  58.  
  59. ' Step 2: Find out if they are enabled or not...
  60.  i=RegReadValue(sp&"NoFavoritesMenu") 'DW
  61.  If IsEmpty(i) or i=0 then
  62.   Call SetUIElementEx(1,true)
  63.  end if
  64.  
  65.  i=RegReadValue(sp&"NoRecentDocsMenu") 'DW
  66.  if IsEmpty(i) or i=0 then
  67.   Call SetUIElementEx(2,true)
  68.  end if
  69.  
  70. if k<4 then
  71.  i=RegReadValue(sp&"NoRun") 'DW
  72.  if IsEmpty(i) or i=0 then
  73.   Call SetUIElementEx(3,true)
  74.  end if
  75. else
  76.  i=RegReadValue(sP3) 'DW
  77.  if IsEmpty(i) or i=1 then
  78.   Call SetUIElementEx(3,true)
  79.  end if
  80. end if
  81.  
  82.  i=RegReadValue(sp&"NoClose") 'DW
  83.  if IsEmpty(i) or i=0 then
  84.   Call SetUIElementEx(4,true)
  85.  end if
  86.  
  87.  i=RegReadValue(sp&"NoFind") 
  88.  if IsEmpty(i) or i=0 then
  89.   Call SetUIElementEx(5,true)
  90.  end if
  91.  
  92. if k>3 then
  93.  i=RegReadValue(sP4) 'DW
  94.  if IsEmpty(i) or i=1 then
  95.   Call SetUIElementEx(6,true)
  96.  end if
  97. else
  98.  i=RegReadValue(sp&"NoLogOff") 'Binary
  99.  if IsEmpty(i) or i=0 then
  100.   Call SetUIElementEx(6,true)
  101.  end if
  102. end if
  103.  
  104.  i=RegReadValue(sP2) 'DW
  105.  if IsEmpty(i) or i=0 then
  106.   Call SetUIElementEx(7,true)
  107.  end if
  108. END SUB
  109.  
  110. 'Called when the Plugin should apply the changes
  111. SUB Plugin_Apply(ElementIndex,ElementSubIndex) 
  112.  w=GetWinVer
  113.  Call WriteIt(1,sp&"NoFavoritesMenu")
  114.  Call WriteIt(2,sp&"NoRecentDocsMenu")
  115.  if w>3 then
  116.   Call WriteIt(3,sP3)
  117.  else
  118.   Call WriteIt(3,sp&"NoRun")
  119.  end if
  120.  Call WriteIt(4,sp&"NoClose")
  121.  Call WriteIt(5,sp&"NoFind")
  122.  Call WriteIt(7,sp2)
  123.  
  124.  b=GetUIElementEx(6)
  125.  if b=true then
  126.   s=RegReadValue(sp&"NoLogOff")
  127.   if IsEmpty(s)=false then
  128.    Call RegDeleteValue(sp&"NoLogOff")
  129.   end if
  130.   s=RegReadValue(sP4)
  131.   if IsEmpty(s)=false then
  132.    Call RegDeleteValue(sP4)
  133.   end if
  134.  else
  135.   Call RegWriteValue(sp&"NoLogOff","01000000",3)
  136.   Call RegWriteValue(sp4,1,2)
  137.  end if
  138.  
  139.  Call IndicateSettingChange()
  140. END SUB
  141.  
  142. Sub WriteIt(ITM,PATH1)
  143.  b=GetUIElementEx(ITM)
  144.  if b=true then
  145.   s=RegReadValue(PATH1)
  146.   if IsEmpty(s)=false then
  147.    Call RegDeleteValue(PATH1)
  148.   end if
  149.  else
  150.   Call RegWriteValue(PATH1,1,2)
  151.  end if
  152. End Sub
  153.  
  154. SUB Plugin_Terminate
  155. END SUB
  156.